**************load balancer
**************cluster
*****Elastic search(sandeep)
*****RabitMq(jatinder)
*****Gearman(sandeep)
*****Nodejs(amit)

-***MongoDb
-cimmulative
-***elias conversion db
-***organic search
-***SAS
-***standalone server, memchache(pipe),esn,
-*** safe insert
-*** SQS(amazon simple queue service)
-*** Server lagging
-***hyperlog, analytics queries,marketing operations,
-*** sharding
- cutting-edge Open Source technology
-root53,59

==== install drop box
32-bit:
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -

64-bit:
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

// open drop box
~/.dropbox-dist/dropboxd




===========================linux alias file =====================================
gedit .bash_aliases [ custom alias are written here ]
gedit /root/.bashrc [ main alias are written here]


==== AMAZON SERVER ===
Learn these :
-S3
-Logs files temp files issues
- Load balancer[(stop all crons and load balancers and then go to instance copy ip check it and then put on load balancer and put all crons running) off when we change setting file or any changes then put again on]



========= import the excel/csv file code======================= 
$files = $_FILES[ 'excelFile' ];
$fileElementName = $files[ 'name' ];
$tmp_name = $files[ 'tmp_name' ];
if( $tmp_name ){
	 // get file extension
    $extension = array_pop( explode( '.', $files[ 'name' ] ) );
	if( $extension == 'xls' || $extension == 'xlsx' || $extension == 'csv' ){
		$handle = fopen( $tmp_name, "r" );
		echo "<table><tr><td>productId</td><td>Name</td><tr>";
		$row = 1;
		if (($handle = fopen( $tmp_name, "r" ) ) !== FALSE) {
			while ( ( $data = fgetcsv( $handle, 10000, "," ) ) !== FALSE ) {
				$num = count( $data );
				if( $row > 1 ){
					$productId = trim( $data[ 0 ] );
					$productName = trim( $data[ 1 ] );
					echo "<tr><td>$productId</td><td>$productName</td><tr>";
				}
				$row++;
			}
		}
		echo "</tr></table>";
	}else{
		$errorMsg = "Invalid file,Only excel or csv file can allow to upload!";
	}
}
======================================================== 


======= Database details ======= 
most of the case we try to keep it in root path and file name is  ".my.cnf"
to check what's that user this "cat .my.cnf" command in command prompt


======= to connect to remote server use this command ======= 
ssh -i [pem file path] ec2-user@75.101.147.144
Example
ssh -i /home/pramod/Documents/connectFiles/eventfulbeta.pem ec2-user@75.101.147.144

======= MYSQL ==========
gedit /etc/phpmyadmin/config.inc.php

mysql -u root -pbetaout < db.sql

mysql -u root -pbetaout --database <db name> < db.sql

mysqldump --add-drop-database --databases contentcloud_contentengine contentcloud_setting | gzip >  cc.sql.gz

========= conf file =====
gedit /etc/apache2/sites-enabled/ccloud.conf

======== Restart apache =========
service apache2 restart


========= connect pem files code file ==========
gedit /usr/sbin/connect

======== php.ini file path ============
gedit /etc/php5/apache2/php.ini


================ check the php file process ======
ps -eaf | grep php 



STEPS TO START CRON JOB:
------------------------
// check the cron job process status
1.
	ps -eaf | grep crons.sh

// if process is there the kill it
2.
	kill <processid>
// make cron job precess live
3.
	nohup ./crons.sh > qyuki_nohup.log 2>&1 &



To add file as a cron just follow the below steps
1. run "crontab -e"
2. open file in write mode(hit 'i') and put the absolute full file path at end of the file
(*/10 * * * * php /var/www/jal/php/daemon/importOrder.php)
where "*****" are represents the minute,hour,day,month,year

==============================================









install database using command 
mysql -u root -pbetaout --database <database name> < db.sql

// to restore the svn file from server
svn revert --depth=infinity create-profile.css
==============================================

// close firefox via cmd
killall -9 -r firefox
========================

================= .my.cnf ===============
Mysql database

[client]
user=root
password="betaout"



======= LIFE ========
1. Make two lists: a list of work-related skills you want to learn now and a list for things you want to achieve in the future.
2. Take online courses
3. Always be humble and willing to learn.
4. Follow your questions.
5. Adopt a productive hobby.
6. Apply what you learn.
7. "You don't have to immediately solve the world's problems in the first two hours after you wake up. Your energy should be first focussed on the most important jobs, not the least important. Check your emails only once you reach office. Checking them in the morning won't really make you productive. On the contrary, it'll put you in an unhappy mood." 


============ FACEBOOK PAGE TAB PROCESS ================
https://developers.facebook.com

https url needed e.g. https://www.qyuki.com/fbtab-shraddha-sharma/

======= Register app for facebook page's FB-TAB =========
https://www.facebook.com/dialog/pagetab?app_id=<YOUR-APP-ID>&redirect_uri=http://www.qyuki.com/fbtab-shraddha-sharma/


================= Like command =====================
$objChannelReports = getDb( 'ytChannelReport' );
$objChannelReports->setLikeCondition( " channelTitle like '%$name%'" );
$objChannelReports->set( "quantity||1" );
if( $objChannelReports->getResultCount() > 0 ){
	$channelId = $objChannelReports->getChannelId();
}


===================================================

